<?php

namespace plugin\admin\app\model;

use plugin\admin\app\model\Base;

class TransferJob extends Base
{
    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'wa_transfer_jobs';

    /**
     * The primary key associated with the table.
     *
     * @var string
     */
    protected $primaryKey = 'id';
    /**
     * Indicates if the model should be timestamped.
     *
     * @var bool
     */
    public $timestamps = false;

    const PENDING = 0;

    const EXECUTE_SUCCESS = 1;

    const EXECUTE_FAILED = 2;
    
    public static function getStatusText($status)
    {
        $statusText = [
            self::PENDING => '待执行',
            self::EXECUTE_SUCCESS => '执行成功',
            self::EXECUTE_FAILED => '执行失败',
        ];

        return $statusText[$status] ?? '未知状态';
    }
}
